package pl.register.android.homework;

import pl.register.android.rating.Rating;

import java.io.Serializable;


/**
 * @author Mateusz Strzelecki
 * @since 2013-04-14
 */
public class Homework implements Serializable {

    private Long id;

    private HomeworkTopic topic;

    private boolean isDone;

    private Rating rating;

    public Homework(boolean done, Rating rating) {
        this.id = null;
        isDone = done;
        this.rating = rating;
    }



    public Homework(Long id, HomeworkTopic topic, boolean done, Rating rating) {
        this.id = id;
        this.topic = topic;
        isDone = done;
        this.rating = rating;
    }

    public Homework(HomeworkTopic topic, boolean done, Rating rating) {
        this.id = null;
        this.topic = topic;
        isDone = done;
        this.rating = rating;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public HomeworkTopic getTopic() {
        return topic;
    }

    public void setTopic(HomeworkTopic topic) {
        this.topic = topic;
    }

    public boolean isDone() {
        return isDone;
    }

    public void setDone(boolean done) {
        isDone = done;
    }

    public Rating getRating() {
        return rating;
    }

    public void setRating(Rating rating) {
        this.rating = rating;
    }

    @Override
    public String toString() {
        return "Homework{" +
                "id=" + id +
                ", topic=" + topic +
                ", isDone=" + isDone +
                ", rating=" + rating +
                '}';
    }
}